<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@include file="/resource/common/taglib.jspf"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>${SESSION_COMPANY}-权限管理</title>
<%@include file="/resource/common/jquery.jspf"%>
<%@include file="/resource/common/commonCss.jspf"%>
<%@include file="/resource/common/bootstrap.jspf"%>
<%@include file="/resource/common/showLoading.jspf"%>
<%@include file="/resource/common/tips.jspf"%>
<script type="text/javascript" src="${ctxStatic }/js/system/layerParentFn.js"></script>
<script type="text/javascript">
	var PATH = "${ctx}";
	function addLayerOpen(id,titles){
		titles = id >0?"编辑权限："+titles:"新增:权限信息";
		layerParentFn.layerOpenModalDialog(titles,"addSysAuthorityByLayer.do?aid="+id,865,500,"inputForm","saveSysAuthorityJson.do");
	}
	function browseLayerOpen(id,titles){
		titles = "浏览:"+titles;
		layerParentFn.layerOpenBrowseModalDialog(titles,"addSysAuthorityByLayer.do?aid="+id,865,500);
	}

</script>
</head>
<body>
	<div id="body-wrapper">
		<div id="main-content">
			<div class="clear"></div>
			<!-- End .clear -->
				<div class="content-box-content">
					<div class="search-box">
						<shiro:hasPermission name="SysAuthority:SYS_ADD"><a class="btn btn-primary" style="padding-bottom: 0px;padding-top: 0px;line-height: 25px;margin-top: -5px;" href="javascript:void(0)" onclick="addLayerOpen(0,'');"><i class="fa fa-plus"></i>&nbsp;&nbsp;新增</a></shiro:hasPermission>
					</div>
					<div class="tab-content default-tab table-hover" id="tab1">
						<table class="table table-bordered table-hover">
							<thead>
								<tr>
									<th class="text-center">编号</th>
									<th class="text-center">名称</th>
									<th class="text-center">标识</th>
									<th class="text-center">描述</th>
									<th class="text-center">排序</th>
									<th class="text-center w210">操作</th>
								</tr>
							</thead>
							<tbody>
								<c:forEach var="authority" items="${pageBean.list}"
									varStatus="abc">
									<tr id="tr_${authority.aid}">
										<td class="text-center">${startRow+abc.count}</td>
										<td class="text-center">${authority.name}</td>
										<td class="text-center">${authority.tag}</td>
										<td class="text-center">${authority.description}</td>
										<td class="text-center">${authority.sort}</td>
										<td class="text-center">
											<shiro:hasPermission name="SysAuthority:SYS_BROWSE"><a href="javascript:void(0);" onclick="browseLayerOpen(${authority.aid},'${authority.name }');" class="btn btn-xs btn-info"><i class="fa fa-eye"></i>&nbsp;浏览</a> </shiro:hasPermission>
											<shiro:hasPermission name="SysAuthority:SYS_EDIT"><a href="javascript:void(0)" onclick="addLayerOpen(${authority.aid},'${authority.name }');" class="btn btn-xs btn-primary"><i class="fa fa-edit"></i>&nbsp;编辑</a></shiro:hasPermission>
											<shiro:hasPermission name="SysAuthority:SYS_DELETE"><a href="javascript:void(0);"	onclick="layerParentFn.listRowRemoveDeleteByID(${authority.aid},'deleteSysAuthority.do');" class="btn btn-xs btn-danger"><i class="fa fa-trash-o"></i>&nbsp;删除</a></shiro:hasPermission>
										</td>
									</tr>
								</c:forEach>
							</tbody>
							<tfoot>
								<tr>
									<td colspan="7">
										<div class="bulk-actions align-left"></div>
										<div class="paginationstyle">
											<page:pageboot url="sysAuthorityList.do?" tagnum="2" pageBean="${pageBean}" />
										</div>
										<div class="clear"></div>
									</td>
								</tr>
							</tfoot>
						</table>
				</div>
			</div>
		</div>
	</div>
</body>
</html>
